{include file="public/header" /}
<style>
    .layui-input-block{width: 80%}
    .layui-form-radio>.lay-skin-tag,
    .layui-form-checkbox>.lay-skin-tag{
        font-size: 13px;
        border-radius: 5px;
        height: 25px;
        line-height: 25px;
        margin-top: 7px;
        margin-right: 10px;
        color: #fff !important;
        background: #d2d2d2 !important;
    }
    .layui-form-checked>.lay-skin-tag,
    .layui-form-radioed>.lay-skin-tag {
        background-color: #16b777 !important;
    }
</style>
<body>
<div class="x-body">
    <form action="{:url('save')}" class="layui-form" id="form">
        <input type="hidden" name="course_id" value="{$id?$id:''}"/>
        <input type="hidden" name="id" value="{$info?$info.id:''}"/>
        <div class="layui-form-item">
            <label class="layui-form-label">章节标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" value="{$info?$info.title:''}" placeholder="请输入标题" lay-verify="required"
                       class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">视频封面</label>
            <div class="layui-input-block">
                <?php $data = isset($info)?$info:[];?>
                {table:alone view='items/img' info='$data' form='["field" => "icon", "value" => 1]'/}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">视频</label>
            <div class="layui-input-block">
                <?php $data = isset($info)?$info:[];?>
                {table:alone view='items/video_nil' info='$data' form='["field" => "video","duration"=>"duration","value" => 1,"type"=>2]'/}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">排序</label>
            <div class="layui-input-block">
                <input type="text" name="sort" value="{$info?$info.sort:''}" placeholder="请输入排序"  class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
        </div>
    </form>
</div>
</body>
{include file="public/footer" /}
{include file="public/qiniuToken" /}
</html>